package com.szqhyxj.youxiangju.biz.receipt;

import com.szqhyxj.youxiangju.biz.plan.RepaymentModel;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/23.
 */

public class ReceiptModel  {

    public enum CardStatus {

        NO_CERT(0, "未实名报备"),
        PLAN_RUNNING(1, "计划执行中"),
        CAN_MAKE_PLAN(2, "制定计划"),
        OUT_DATE_OF_BILL(3, "账单日外");

        private int code;

        private String desc;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        CardStatus(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }
    }

    private interface Receiptservice {
        @POST("user/bankCard/receivables")
        Observable<BaseResult<List<ReceiptEntity>>> receipt();
    }

    public static Observable<BaseResult<List<ReceiptEntity>>> getReceipt() {
        return RetrofitFacade.Companion.getRetrofit().create(Receiptservice.class).receipt();
    }

    public static class ReceiptEntity {
        public String getCardId() {
            return cardId;
        }

        public void setCardId(String cardId) {
            this.cardId = cardId;
        }

        private String cardId;
        private String detDays;//距离账单日还有多少天
        private int bankStates;//卡状态
        private String bankCardNo;//银行卡号
        private String cardLogo;//银行图标
        private int billStates;//是否已出账单
        private String fixedAmount;//固定额度
        private String btName;//银行名称
        private String billingDate; //账单日
        private String dueDate;//还款日
        private String areainfo;//地址

        public String getCardPhone() {
            return cardPhone;
        }

        public void setCardPhone(String cardPhone) {
            this.cardPhone = cardPhone;
        }

        private String cardPhone;


        public String getBillingDate() {
            return billingDate;
        }

        public void setBillingDate(String billingDate) {
            this.billingDate = billingDate;
        }

        public String getDueDate() {
            return dueDate;
        }

        public void setDueDate(String dueDate) {
            this.dueDate = dueDate;
        }

        public String getAreainfo() {
            return areainfo;
        }

        public void setAreainfo(String areainfo) {
            this.areainfo = areainfo;
        }



        public void setDetDays(String detDays) {
            this.detDays = detDays;
        }

        public String getDetDays() {
            return detDays;
        }

        public void setBankStates(int bankStates) {
            this.bankStates = bankStates;
        }

        public int getBankStates() {
            return bankStates;
        }

        public void setBankCardNo(String bankCardNo) {
            this.bankCardNo = bankCardNo;
        }

        public String getBankCardNo() {
            return bankCardNo;
        }

        public void setCardLogo(String cardLogo) {
            this.cardLogo = cardLogo;
        }

        public String getCardLogo() {
            return cardLogo;
        }

        public void setBillStates(int billStates) {
            this.billStates = billStates;
        }

        public int getBillStates() {
            return billStates;
        }

        public void setFixedAmount(String fixedAmount) {
            this.fixedAmount = fixedAmount;
        }

        public String getFixedAmount() {
            return fixedAmount;
        }

        public void setBtName(String btName) {
            this.btName = btName;
        }

        public String getBtName() {
            return btName;
        }

        @Override
        public String toString() {
            return
                    "Response{" +
                            "detDays = '" + detDays + '\'' +
                            ",bankStates = '" + bankStates + '\'' +
                            ",bankCardNo = '" + bankCardNo + '\'' +
                            ",cardLogo = '" + cardLogo + '\'' +
                            ",billStates = '" + billStates + '\'' +
                            ",fixedAmount = '" + fixedAmount + '\'' +
                            ",btName = '" + btName + '\'' +
                            "}";
        }
    }
}
